home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / dist-packages / checkbox / contrib / bpickle_registry.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  1.2 KB  |  31 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from checkbox.contrib import bpickle
  5. from checkbox.registry import Registry
  6.  
  7. def install():
  8.     '''Install bpickle extensions for Registry types.'''
  9.     for type, function in get_registry_types():
  10.         bpickle.dumps_table[type] = function
  11.     
  12.  
  13.  
  14. def uninstall():
  15.     '''Uninstall bpickle extensions for Registry types.'''
  16.     for type, function in get_registry_types():
  17.         del bpickle.dumps_table[type]
  18.     
  19.  
  20.  
  21. def get_registry_types():
  22.     '''
  23.     Generator yields C{(type, bpickle_function)} for available Registry
  24.     types.
  25.     '''
  26.     for type, function in [
  27.         (Registry, bpickle.dumps_dict)]:
  28.         yield (type, function)
  29.     
  30.  
  31.